package com.xbniao.gcfs.common.util.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Author:wangbin.
 * @Description.
 * @Date:Created in 14:01 2017/10/24.
 * @Modified By:
 */
@Target(ElementType.FIELD) //定义注解的位置-->此定义只能加在字段上
@Retention(RetentionPolicy.RUNTIME)  //运行是注解
@Documented
@Constraint(validatedBy = {FileValidatorAnnotationImpl.class}) // validatedBy 对应校验实现逻辑
public @interface FileValidatorAnnotation {

    String message() default "{com.xbniao.gcfs.common.util.validation.FileValidatorAnnotation.message}";

    //下面这两个属性必须添加，否则会报错
    Class<?>[] groups() default { };
    Class<? extends Payload>[] payload() default { };
}
